package com.aircms.dao;

import com.aircms.pojo.Role;
import com.aircms.pojo.validation.BaseQueryFieldsValidation;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public interface RoleMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Role record);

    int insertSelective(Role record);

    Role selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Role record);

    int updateByPrimaryKey(Role record);

    List<Role> selectALl(BaseQueryFieldsValidation baseQueryFieldsValidation);

    List<Role> selectAllUsableRole();        // 查询所有可用的角色

    int countByName(String name);

    int setStatus(@Param("id") Integer id, @Param("status") Integer status);
}